<?php
$sql['get_pesan_by_id']="
  SELECT 
  	psnId AS PESAN_ID,
  	psnSubjek AS PESAN_SUBJEK,
  	psnPenerima AS PESAN_PENERIMA,
  	psnPengirim AS PESAN_PENGIRIM,
  	psnTanggal AS PESAN_TANGGAL,
  	psnIsi AS PESAN_ISI,
  	psnIsBaca AS PESAN_IS_BACA
  FROM u_pesan
  WHERE
  	psnId='%s';
";
$sql['get_pesan_by_penerima']="
  SELECT 
  	psnId AS PESAN_ID,
  	psnSubjek AS PESAN_SUBJEK,
  	psnPenerima AS PESAN_PENERIMA,
  	psnPengirim AS PESAN_PENGIRIM,
  	psnTanggal AS PESAN_TANGGAL,
  	psnIsi AS PESAN_ISI,
  	psnIsBaca AS PESAN_IS_BACA
  FROM u_pesan
  WHERE
  	psnPenerima='%s';
";
$sql['get_pesan_by_pengirim']="
  SELECT 
  	psnId AS PESAN_ID,
  	psnSubjek AS PESAN_SUBJEK,
  	psnPenerima AS PESAN_PENERIMA,
  	psnPengirim AS PESAN_PENGIRIM,
  	psnTanggal AS PESAN_TANGGAL,
  	psnIsi AS PESAN_ISI,
  	psnIsBaca AS PESAN_IS_BACA
  FROM u_pesan
  WHERE
  	psnPengirim='%s';
";
$sql['do_add_pesan']="
  INSERT u_pesan
  SET  
  	psnSubjek='%s',
  	psnPenerima='%s',
  	psnPengirim='%s',
  	psnTanggal=NOW(),
  	psnIsi='%s',
  	psnIsBaca='no';
";
?>
